Compartmental modeling and neural network optimization can be used inconjunction to understand the neural computations which underlie animal behavior. The proposed research focusses on chemotaxis in the nematode Caenorhabditis elegans, whose neuroanatomy is known in great detail. Recently the sponsor has developed experimental techniques which enable making the necessary electrophysiological recordings. It is now possible for the first time to construct a realistic neural network model with the objective of understanding the neuronal basis of neural computation in this animal. The chemotaxis circuit is known with confidence. Compartmental models of individual neurons will be constructed based on known morphologies and measured biophysical parameters. Synaptic functions will either be measured or assumed similar to Ascaris suum, and synaptic weights will be assumed proportional to the number of connections between neurons. Brute force search and/or neural network optimization will be used to determine the polarity of synaptic connections, and the resulting model will be tested by comparing simulated laser ablations done in the model with real laser ablations done in the animal. The goal is to reveal the mechanisms by which C. elegans carries out neural computations in spite of inherent neuronal noise and other limitations associated with its extremely small size.